<template>
  <div class="bottom-nav">
    <van-row
      v-for="(nav, index) in navList"
      :key="index"
    >
      <van-col
        v-for="(item, index) in nav"
        :key="index"
        class="bottom-nav-item"
        style="margin-top: .5rem;"
        :span="24"
      >
        <div class="bottom-nav-title">{{item.title}}</div>
        <van-row class="bottom-nav-list">
          <van-col
            v-for="(sub, index) in item.list"
            :key="index"
            :span="8"
          >
            <a :href="sub.url" class="link">{{sub.name}}</a>
          </van-col>
        </van-row>
      </van-col>
    </van-row>
  </div>
</template>

<script>
export default {
  name: 'HomeBottomNav',
  props: {
    list: {
      type: Array,
      default() {
        return [
          {
            title: '彩票',
            list: [
              { name: '中彩网', url: '' },
              { name: '新浪彩票频道', url: '' },
              { name: '彩票最新开奖', url: '' },
              { name: '500WAN彩票', url: '' },
              { name: '中国体彩网', url: '' },
              { name: '中国福彩网', url: '' }
            ]
          },
          {
            title: '国内新闻',
            list: [
              { name: '网易新闻', url: '' },
              { name: 'QQ新闻', url: '' },
              { name: '新华网', url: '' },
              { name: '人民网', url: '' },
              { name: '新浪新网', url: '' },
              { name: '凤凰网', url: '' }
            ]
          },
          {
            title: '国内银行',
            list: [
              { name: '平安银行', url: '' },
              { name: '招商银行', url: '' },
              { name: '中国银行', url: '' },
              { name: '建设银行', url: '' },
              { name: '农业银行', url: '' },
              { name: '工商银行', url: '' }
            ]
          },
          {
            title: '比分大全',
            list: [
              { name: '篮球比分', url: '' },
              { name: '讯盈比分', url: '' },
              { name: '7M比分', url: '' },
              { name: '华体比分', url: '' },
              { name: '博体比分', url: '' },
              { name: '球探比分', url: '' }
            ]
          },
          {
            title: '电视直播',
            list: [
              { name: 'PPLive', url: '' },
              { name: '新传体育宽频', url: '' },
              { name: '迅雷看看', url: '' },
              { name: 'CCTV网络电视', url: '' },
              { name: '7M直播', url: '' },
              { name: '体育直播吧', url: '' }
            ]
          },
          {
            title: '搜索',
            list: [
              { name: '微博搜索', url: '' },
              { name: 'SOSO', url: '' },
              { name: '360搜索', url: '' },
              { name: '搜狗中文搜索', url: '' },
              { name: '百度中文搜索', url: '' },
              { name: 'Google搜索', url: '' }
            ]
          }
        ];
      }
    }
  },
  computed: {
    navList() {
      return this.list.map(item => [item]);
    }
  }
};
</script>

<style lang="less" scoped>
  .bottom-nav {
    padding: 20px;
    border: 1px solid #ddd;
    background-color: #fff;
    .bottom-nav-item {
      .bottom-nav-title {
        margin-bottom: 5px;
        font-weight: bold;
        color: #498949;
      }
      .bottom-nav-list {
        .van-col {
          margin: 5px 0;
          .link {
            color: #666;
            text-decoration: none;
            &:hover {
              color: red;
              text-decoration: underline;
            }
          }
        }
      }
    }
  }
</style>
